package com.ncbee.base.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.ncbee.base.model.entity.Resource;
import com.ncbee.base.model.entity.User;
import com.ncbee.base.model.vo.BaseQuery;
import com.ncbee.base.model.vo.UserInfo;
import com.ncbee.base.model.vo.tableVo.ResourceVo;
import com.ncbee.base.model.vo.tableVo.UserVo;
import org.apache.shiro.authc.AuthenticationException;

import java.util.List;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author youdianyun
 * @since 2018-11-23
 */
public interface UserService extends IService<User> {


    IPage<UserVo> getUserList(IPage<UserVo> page, BaseQuery<User> baseQuery);

    boolean grantRoleToUser(Long userId, String roleStr);

    UserInfo userLogin(String username, String password) throws AuthenticationException;

    List<Resource> getUserAllResourceById(Long id);

    List<ResourceVo> getUserMenuResource(Long id);

    boolean resetUserPassword(Long userId);

    boolean updateUserPassword(Long userId, String password);
}
